package com.cntcdt.api.db.model.base;

import java.io.Serializable;
import java.sql.ResultSet;
import java.util.Date;

/**
 * 这是cdt_consociation_company_user的数据传输对象基类,直接与表对应<br>
 */
public abstract class ConsociationCompanyUserModelBase  implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 属性:id<br>
     */
    private Integer id;
    /**
     * 属性:nickName<br>
     */
    private String nickName;
    /**
     * 属性:consociationCompanyId<br>
     */
    private Integer consociationCompanyId;
    /**
     * 属性:password<br>
     */
    private String password;
    /**
     * 属性:addTime<br>
     */
    private Date addTime;
    /**
     * 属性:updateTime<br>
     */
    private Date updateTime;
    /**
     * 属性:headImage<br>
     */
    private String headImage;
    
    private String userName;
    
    private Integer consociationId;

    /**
     *  默认构造方法,构造一个默认的ConsociationCompanyUserModelBase对象
     */
    public ConsociationCompanyUserModelBase(){
    }

    /**
     *  构造函数
     *  @param rs 数据库查询结果集
     */
    public ConsociationCompanyUserModelBase(ResultSet rs){
           try{
               this.id = rs.getInt("id");
               this.nickName = rs.getString("nickName");
               this.consociationCompanyId = rs.getInt("consociationCompanyId");
               this.password = rs.getString("password");
               this.addTime = rs.getDate("addTime");
               this.updateTime = rs.getDate("updateTime");
               this.headImage = rs.getString("headImage");
               this.userName = rs.getString("userName");
               this.consociationId = rs.getInt("consociationId");
           }catch(Exception e) {
              e.printStackTrace(); 
           }
    }

    public Integer getConsociationId() {
		return consociationId;
	}

	public void setConsociationId(Integer consociationId) {
		this.consociationId = consociationId;
	}

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	/**
     * 设置属性id<br>
     * @param id 待设置的属性id的值
     */
    public void setId(Integer id) {
        this.id = id;
    }

    /**
     * 获取属性id<br>
     * @return 属性id的值
     */
    public Integer getId() {
        return id;
    }

    /**
     * 设置属性nickName<br>
     * @param nickName 待设置的属性nickName的值
     */
    public void setNickName(String nickName) {
        this.nickName = nickName;
    }

    /**
     * 获取属性nickName<br>
     * @return 属性nickName的值
     */
    public String getNickName() {
        return nickName;
    }

    /**
     * 设置属性consociationCompanyId<br>
     * @param consociationCompanyId 待设置的属性consociationCompanyId的值
     */
    public void setConsociationCompanyId(Integer consociationCompanyId) {
        this.consociationCompanyId = consociationCompanyId;
    }

    /**
     * 获取属性consociationCompanyId<br>
     * @return 属性consociationCompanyId的值
     */
    public Integer getConsociationCompanyId() {
        return consociationCompanyId;
    }

    /**
     * 设置属性password<br>
     * @param password 待设置的属性password的值
     */
    public void setPassword(String password) {
        this.password = password;
    }

    /**
     * 获取属性password<br>
     * @return 属性password的值
     */
    public String getPassword() {
        return password;
    }

    /**
     * 设置属性addTime<br>
     * @param addTime 待设置的属性addTime的值
     */
    public void setAddTime(Date addTime) {
        this.addTime = addTime;
    }

    /**
     * 获取属性addTime<br>
     * @return 属性addTime的值
     */
    public Date getAddTime() {
        return addTime;
    }

    /**
     * 设置属性updateTime<br>
     * @param updateTime 待设置的属性updateTime的值
     */
    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    /**
     * 获取属性updateTime<br>
     * @return 属性updateTime的值
     */
    public Date getUpdateTime() {
        return updateTime;
    }

    /**
     * 设置属性headImage<br>
     * @param headImage 待设置的属性headImage的值
     */
    public void setHeadImage(String headImage) {
        this.headImage = headImage;
    }

    /**
     * 获取属性headImage<br>
     * @return 属性headImage的值
     */
    public String getHeadImage() {
        return headImage;
    }


    /**
     * 比较两个对象在逻辑上是否相等
     * @see java.lang.Object#equals(java.lang.Object)
     */
    public boolean equals(Object other) {
        if (this == other) {
            return true;
        }
        if (!(other instanceof ConsociationCompanyUserModelBase)) {
            return false;
        }

        final ConsociationCompanyUserModelBase otherModel = (ConsociationCompanyUserModelBase) other;
        if (getId()!=null && !getId().equals(otherModel.getId())) {
            return false;
        }
        return true;
    }

    /**
     * 根据主键生成HashCode
     * @see java.lang.Object#hashCode()
     */
    public int hashCode() {
        StringBuffer buffer = new StringBuffer();
        buffer.append('|').append(id);
        return buffer.toString().hashCode();
    }
}
